package cn.zglbk.generator.test;
import cn.zglbk.data.csv.ClientTableFile;
import cn.zglbk.data.csv.FileHandler;
import cn.zglbk.data.csv.FileTable;
import cn.zglbk.data.csv.StaticConfigMessage;

/**
 * @author zglbk.cn
 * @email 1030681978@qq.com
 * @date 2020/12/3 23:55
 */
@ClientTableFile
public class ShopTable implements FileTable {
    private final int id;
    private final String name;
    private final String enumName;
    private final int type;
//    private final int prize;
//    private final int reward;
//    private final int count;
//    private final int vipLv;

    public ShopTable(FileHandler<ShopTable> file) {
        this.id = file.readInt("id");
        this.name = file.readString("name");
        this.enumName = file.readString("enumName");
        this.type = file.readInt("type");
//        this.prize = file.readInt("prize");
//        this.reward  = file.readInt("reward");
//        this.count = file.readInt("count");
//        this.vipLv = file.readInt("vipLv");
    }
    public static ShopTable getById(int id){
        return StaticConfigMessage.getInstance().get(ShopTable.class, id);
    }
    public String getEnumName() {
        return enumName;
    }

    public String getName() {
        return name;
    }

    public int getType() {
        return type;
    }

    @Override
    public int getId() {
        return id;
    }
}
